<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">

<div th:fragment="siteTree(action)">
    <ul class="layui-tree">
        <li class="nav-title">
            <h2>常用功能<i class="layui-icon layui-icon-down"></i></h2>
        </li>
        <li th:class="'site-tree-noicon '+${#strings.equals(action,'blogEdit')?'layui-this':''}">
            <a href="/center/blogPublish">
                <cite>博客编辑</cite>
                <!--<em></em>-->
            </a>
        </li>
        <li th:class="'site-tree-noicon '+${#strings.equals(action,'postEdit')?'layui-this':''}">
            <a href="#">
                <cite>发表帖子</cite>
                <!--<em>编写</em>-->
            </a>
        </li>
        <li class="nav-title">
            <h2>资料管理<i class="layui-icon layui-icon-down"></i></h2>
        </li>
        <li th:class="'site-tree-noicon '+${#strings.equals(action,'accountOAuth')?'layui-this':''}">
            <a href="/center/accountOAuth">
                <cite>账号绑定</cite>
            </a>
        </li>
        <li th:class="'site-tree-noicon '+${#strings.equals(action,'userInfo')?'layui-this':''}">
            <a href="/center/userInfo">
                <cite>个人信息</cite>
            </a>
        </li>
        <li class="nav-title">
            <h2>博客管理<i class="layui-icon layui-icon-down"></i></h2>

        </li>
        <li th:class="'site-tree-noicon '+${#strings.equals(action,'blogManage')?'layui-this':''}">
            <a href="/center/blogManage">
                <cite>博客列表</cite>
            </a>
        </li>
        <li th:class="'site-tree-noicon '+${#strings.equals(action,'blogComments')?'layui-this':''}">
            <a href="/center/blogComments">
                <cite>评论管理</cite>
            </a>
        </li>
        <li shiro:hasRole="administrator" th:class="'site-tree-noicon '+${#strings.equals(action,'listBlogType')?'layui-this':''}">
            <a href="/blogType/list">
                <cite>分类管理</cite>
            </a>
        </li>
        <li class="nav-title">
            <h2>帖子管理<i class="layui-icon layui-icon-down"></i></h2>
        </li>
        <li th:class="'site-tree-noicon '+${#strings.equals(action,'postManage')?'layui-this':''}">
            <a href="/center/postManage">
                <cite>帖子列表</cite>
            </a>
        </li>
        <li th:class="'site-tree-noicon '+${#strings.equals(action,'postComments')?'layui-this':''}">
            <a href="/center/postComments">
                <cite>评论管理</cite>
            </a>
        </li>

    </ul>
</div>

</html>
